<!Doctype Html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>万能收款码</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            font-family: Microsoft yahei
        }
        
        .code-item {
            width: 100%;
            margin: 0 auto;
            padding-bottom: 1px;
            display: none;
            height: 99.9%
        }
        
        .code-title {
            height: 75pt;
            background-color: #f2f2f2;
            background-position: center;
            background-repeat: no-repeat;
            background-size: 50%
        }
        
        .code-area,
        .code-footer {
            text-align: center
        }
        
        .code-footer {
            height: 5pc;
            background-color: #fff;
            color: #666;
            line-height: 5pc;
            font-size: 20px;
            margin: -2px 2px 2px
        }
        
        body,
        html {
            height: 100%;
            margin: 0;
            font-size: 16px
        }
        
        body,
        html {
            height: 100%;
            margin: 0;
            font-size: 16px
        }
        
        body {
            font-family: -apple-system-font, YouYuan, Microsoft YaHei, Helvetica Neue, Helvetica, sans-serif
        }
        
        .ui-qlogo {
            width: 55px;
            height: 55px;
            background-size: 100% 100%;
            margin: 5px;
            border-radius: 30px
        }
        
        .code-item {
            width: 100%;
            display: none
        }
        
        #color {
            background-color: #009688
        }
        
        .ui-flex-pack-center {
            -webkit-box-pack: center
        }
        
        .ui-flex-ver {
            -webkit-box-orient: vertical
        }
        
        .ui-flex-align-center {
            -webkit-box-align: center
        }
        
        h1,
        h2,
        h3,
        h4,
        h5 {
            margin: 0
        }
        
        .ui-panel {
            display: -webkit-box;
            width: 100%;
            -webkit-box-sizing: border-box
        }
        
        .icon-weixin2 {
            font-size: 54px;
            color: #46a638
        }
        
        h1 {
            font-size: 25px
        }
        
        #ui-head {
            background-color: #fff;
            padding: 10px 0
        }
        
        h2 {
            font-size: 16px;
            font-weight: 400
        }
        
        .ui-tips {
            background-color: #fff;
            color: #46a638;
            font-size: 20px;
            text-align: center;
            padding: 5px 0;
            margin: 25px auto;
            width: 240px;
            border-radius: 20px
        }
        
        .ui-qrcode {
            background-color: #fff;
            border-radius: 15px;
            width: 230px;
            height: 230px;
            margin: 0 auto;
            text-align: center
        }
        
        .ui-qrcode img {
            width: 210px;
            height: 210px;
            margin-top: 10px
        }
        
        .ui-paytext {
            border-bottom: 1px dotted #fff;
            margin: 0 auto;
            width: 215px;
            height: 25px
        }
        
        #ui-setps {
            color: #fff;
            text-align: center;
            font-size: 14px
        }
        
        #ui-setps i {
            font-size: 30px
        }
        
        .ui-circle {
            background-color: #fff;
            border-radius: 50%;
            color: #46a638;
            text-align: center;
            font-size: 11px;
            width: 16px;
            height: 16px;
            line-height: 16px;
            margin: 0 auto;
            margin-bottom: 10px
        }
        
        #ui-setps>div {
            padding: 15px 10px 0 10px
        }
        
        .ui-box {
            -webkit-box-flex: 1
        }
        
        .ui-padtop10 {
            padding-top: 8px;
            width: 85px;
        }
        
        @font-face {
            font-family: iconfont;
            src: url(iconfont.eot?t=1535512025124);
            src: url(iconfont.eot?t=1535512025124#iefix) format('embedded-opentype'), url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAkgAAsAAAAADTwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8d0oxY21hcAAAAYAAAACaAAACGDficlNnbHlmAAACHAAABKsAAAX48ttoaWhlYWQAAAbIAAAALwAAADYSd6GwaGhlYQAABvgAAAAcAAAAJAfeA4tobXR4AAAHFAAAAA8AAAAoKAAAAGxvY2EAAAckAAAAFgAAABYHWgZabWF4cAAABzwAAAAdAAAAIAErAJNuYW1lAAAHXAAAAUUAAAJtPlT+fXBvc3QAAAikAAAAeQAAAKf9MwgNeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMb6wY27438AQw9zI0AAUZgTJAQDiBwwleJzlkrERwjAMRZ+dYBOOguMYIw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q30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicbY1LCsJAEAX7xU+SETEXmYVnyQGkaYdJ66QHHIOQ00cU4sZaPaoWjyr64ug/DhU22GKHPWo0aOFwoE4lm5chyN2XnPTavrfFmC0e+0kklOL7kVNyqz+fhPM85VXUMrBFtu6pbDflXwiPV9CRG5XL54JoAT0kKScAAAA=') format('woff'), url(iconfont.ttf?t=1535512025124) format('truetype'), url(iconfont.svg?t=1535512025124#iconfont) format('svg')
        }
        
        .iconfont {
            font-family: iconfont!important;
            font-size: 16px;
            font-style: normal;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale
        }
        
        .icon-icon-check-solid:before {
            content: "\e672"
        }
        
        .icon-chenggong:before {
            content: "\e638"
        }
        
        .icon-Success-Small:before {
            content: "\e602"
        }
        
        .icon-chenggong1:before {
            content: "\e666"
        }
        
        .icon-caozuochenggong:before {
            content: "\e7f8"
        }
        
        .icon-changan:before {
            content: "\e83e"
        }
        
        .icon-tianjiachenggong:before {
            content: "\e65e"
        }
        
        .icon-erweima:before {
            content: "\e607"
        }
        
        .icon-ic_check:before {
            content: "\e601"
        }
        
        .image-center img {
            margin: 10px auto;
            display: block;
        }
        
        #page-url,
        #qq-url,
        #wechat-url {
            display: none!important;
        }
    </style>
    <script src="../js/qrcode.min.js"></script>
    <!-- 百度统计 -->
    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?e3fd2b8e813e2dd0ad7a24468fe468d4";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
    <script>
        //获取链接中get的参数
        function GetQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]);
            return '';
        }

        // url编码
        function urlEncode(String) {
            return encodeURIComponent(String).replace(/'/g, "%27").replace(/"/g, "%22");
        }

        // QQ钱包收款链接
        qqUrl = GetQueryString("qqUrl");

        // 微信收款链接
        wechatUrl = GetQueryString("wechatUrl");

        // 支付宝收款链接
        aliUrl = GetQueryString("aliUrl");

        // 获取qq号并生成头像，为空则显示默认头像
        qq = GetQueryString("qq");
        qq = qq == '' ? "https://q1.qlogo.cn/g?b=qq&nk=1&s=100" : "https://q1.qlogo.cn/g?b=qq&nk=" + qq + "&s=100";

        // 获取收款名称，为空则显示默认“扫码付款”
        recname = GetQueryString("recname");
        recname = decodeURI(recname) || "扫码付款";
    </script>
</head>

<body>
    <!-- all -->
    <div class="code-item" id="code-all" style="background: linear-gradient(90deg,#20a0ff,#20b8ff);display:none">
        <div id="ui-head" class="ui-panel ui-flex-pack-center ui-flex-align-center">
            <img class="ui-qlogo" id="qlogo_all" src="">
            <div>
                <h1><a style="background: linear-gradient(90deg,#20a0ff,#20b8ff);-webkit-background-clip: text;-webkit-text-fill-color: transparent;" id="recname_all">扫码付款</a>
                </h1>
                <h2 id="qnick"><a style="background: linear-gradient(90deg,#20a0ff,#20b8ff);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>商户收款码</b></a>
                </h2>
            </div>
        </div>
        <div class="ui-box ui-panel ui-flex-align-center">
            <div id="ui-content" class="ui-panel ui-flex-ver ui-flex-pack-center">
                <div class="ui-tips"><a style="background: linear-gradient(90deg,#20a0ff,#20b8ff);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>请长按二维码支付</b></a>
                </div>
                <br>
                <div class="ui-qrcode">
                    <div class="code-area">
                        <div id="page-url" style="display: none;" class="image-center"></div>
                    </div>
                </div>
                <div class="ui-paytext"></div>
                <div id="ui-setps" class="ui-panel ui-flex-pack-center">
                    <div>
                        <div class="ui-circle"><a style="background: linear-gradient(90deg,#20a0ff,#20b8ff);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>1</b></a>
                        </div>
                        <i class="icon iconfont icon-changan"></i>
                        <div class="ui-padtop10"><b>长按二维码</b></div>
                    </div>
                    <div>
                        <div class="ui-circle"><a style="background: linear-gradient(90deg,#20a0ff,#20b8ff);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>2</b></a>
                        </div>
                        <i class="icon iconfont icon-erweima"></i>
                        <div class="ui-padtop10"><b>扫描二维码</b></div>
                    </div>
                    <div>
                        <div class="ui-circle"><a style="background: linear-gradient(90deg,#20a0ff,#20b8ff);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>3</b></a>
                        </div>
                        <i class="icon iconfont icon-icon-check-solid"></i>
                        <div class="ui-padtop10"><b>输入金额支付</b></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- qq -->
    <div class="code-item" id="code-qq" style="background: linear-gradient(90deg,#E51F1F,#B81A1A);display:none">
        <div id="ui-head" class="ui-panel ui-flex-pack-center ui-flex-align-center">
            <img class="ui-qlogo" id="qlogo_qq" src="">
            <div>
                <h1><a style="background: linear-gradient(90deg,#E51F1F,#B81A1A);-webkit-background-clip:
            text;-webkit-text-fill-color: transparent;" id="recname_qq">扫码付款</a>
                </h1>
                <h2 id="qnick"><a style="background: linear-gradient(90deg,#E51F1F,#B81A1A);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>商户收款码</b></a>
                </h2>
            </div>
        </div>
        <div class="ui-box ui-panel ui-flex-align-center">
            <div id="ui-content" class="ui-panel ui-flex-ver ui-flex-pack-center">
                <div class="ui-tips"><a style="background: linear-gradient(90deg,#E51F1F,#B81A1A);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>请长按二维码支付</b></a>
                </div>
                <br>
                <div class="ui-qrcode">
                    <div class="code-area">
                        <img id="qq-url-placeholder" style="display: none;" src="">
                        <div class="image-center" style="display: none;" id="qq-url"></div>
                    </div>
                </div>
                <div class="ui-paytext"></div>
                <div id="ui-setps" class="ui-panel ui-flex-pack-center">
                    <div>
                        <div class="ui-circle"><a style="background: linear-gradient(90deg,#E51F1F,#B81A1A);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>1</b></a>
                        </div>
                        <i class="icon iconfont icon-changan"></i>
                        <div class="ui-padtop10"><b>长按二维码</b></div>
                    </div>
                    <div>
                        <div class="ui-circle"><a style="background: linear-gradient(90deg,#E51F1F,#B81A1A);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>2</b></a>
                        </div>
                        <i class="icon iconfont icon-erweima"></i>
                        <div class="ui-padtop10"><b>扫描二维码</b></div>
                    </div>
                    <div>
                        <div class="ui-circle"><a style="background: linear-gradient(90deg,#E51F1F,#B81A1A);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>3</b></a>
                        </div>
                        <i class="icon iconfont icon-icon-check-solid"></i>
                        <div class="ui-padtop10"><b>输入金额支付</b></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- wechat -->
    <div class="code-item" id="code-wechat" style="background: linear-gradient(90deg,#44AF35,#378F2B);display:none">
        <div id="ui-head" class="ui-panel ui-flex-pack-center ui-flex-align-center">
            <img class="ui-qlogo" id="qlogo_wechat" src="">
            <div>
                <h1><a style="background: linear-gradient(90deg,#44AF35,#378F2B);-webkit-background-clip:
            text;-webkit-text-fill-color: transparent;" id="recname_wechat">扫码付款</a>
                </h1>
                <h2 id="qnick"><a style="background: linear-gradient(90deg,#44AF35,#378F2B);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>商户收款码</b></a>
                </h2>
            </div>
        </div>
        <div class="ui-box ui-panel ui-flex-align-center">
            <div id="ui-content" class="ui-panel ui-flex-ver ui-flex-pack-center">
                <div class="ui-tips"><a style="background: linear-gradient(90deg,#44AF35,#378F2B);-webkit-background-clip:
            text;-webkit-text-fill-color: transparent;"><b>请长按二维码支付</b></a>
                </div>
                <br>
                <div class="ui-qrcode">
                    <div class="code-area">
                        <img id="wechat-url-placeholder" style="display: none;" src="">
                        <div class="image-center" style="display: none;" id="wechat-url"></div>
                    </div>
                </div>
                <div class="ui-paytext"></div>
                <div id="ui-setps" class="ui-panel ui-flex-pack-center">
                    <div>
                        <div class="ui-circle"><a style="background: linear-gradient(90deg,#44AF35,#378F2B);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>1</b></a>
                        </div>
                        <i class="icon iconfont icon-changan"></i>
                        <div class="ui-padtop10"><b>长按二维码</b></div>
                    </div>
                    <div>
                        <div class="ui-circle"><a style="background: linear-gradient(90deg,#44AF35,#378F2B);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>2</b></a>
                        </div>
                        <i class="icon iconfont icon-erweima"></i>
                        <div class="ui-padtop10"><b>扫描二维码</b></div>
                    </div>
                    <div>
                        <div class="ui-circle"><a style="background: linear-gradient(90deg,#44AF35,#378F2B);-webkit-background-clip: text;-webkit-text-fill-color: transparent;"><b>3</b></a>
                        </div>
                        <i class="icon iconfont icon-icon-check-solid"></i>
                        <div class="ui-padtop10"><b>输入金额支付</b></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        function renderQrcode(el, text) {
            el.style.display = 'block';
            new QRCode(el, {
                text,
                width: 210,
                height: 210,
                correctLevel: QRCode.CorrectLevel.L
            });
        }
        if (navigator.userAgent.match(/Alipay/i)) {
            if (!aliUrl) {
                alert("此商户未启用支付宝收款");
            }
            window.location.href = aliUrl;
        } else if (navigator.userAgent.match(/MicroMessenger\//i)) {
            if (!wechatUrl) {
                alert("此商户未启用微信收款");
                document.getElementById("wechat-url-placeholder").style.display = "block";
            } else {
                renderQrcode(document.getElementById("wechat-url"), wechatUrl);
                var image = new Image();
                image.src = document.getElementById("wechat-url").firstChild.toDataURL("image/png");
                document.getElementById("wechat-url").parentNode.append(image);
            }
            document.getElementById("qlogo_wechat").src = qq;
            document.getElementById("recname_wechat").innerHTML = recname;
            document.getElementById("code-wechat").style.display = "block";
        } else if (navigator.userAgent.match(/QQ\//i)) {
            if (!qqUrl) {
                alert("此商户未启用QQ收款");
                document.getElementById("qq-url-placeholder").style.display = "block";
            } else {
                renderQrcode(document.getElementById("qq-url"), qqUrl);
                var image = new Image();
                image.src = document.getElementById("qq-url").firstChild.toDataURL("image/png");
                document.getElementById("qq-url").parentNode.append(image);
            }
            document.getElementById("qlogo_qq").src = qq;
            document.getElementById("recname_qq").innerHTML = recname;
            document.getElementById("code-qq").style.display = "block";
        } else {
            renderQrcode(document.getElementById("page-url"), window.location.href)
            document.getElementById("qlogo_all").src = qq;
            document.getElementById("recname_all").innerHTML = recname;
            var image = new Image();
            image.src = document.getElementById("page-url").firstChild.toDataURL("image/png");
            document.getElementById("page-url").parentNode.append(image);
            document.getElementById("code-all").style.display = "block";
        }
    </script>
</body>

</html>